package com.yanqu.road.entity.log;

import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.log.maidian.BaseLogEntity;

import java.util.Date;

@FieldTypeAnnotation(tableName = "t_l_activity_lucky_shop_draw", autoSave = true, dataUpload = true, eventName = "luckyshop_draw")
public class LogLuckyShopDraw extends BaseLogEntity {

    @FieldTypeAnnotation(desc = "用户id", isIndex = true)
    private long userId;

    @FieldTypeAnnotation(desc = "活动ID", isIndex = true, dataAttribute = "activityid")
    private int activityId;

    @FieldTypeAnnotation(desc = "奖励", dataAttribute = "luckyshop_drawget")
    private String reward;

    @FieldTypeAnnotation(desc = "时间")
    private Date time;

    public LogLuckyShopDraw(long userId, int activityId, String reward) {
        this.userId = userId;
        this.activityId = activityId;
        this.reward = reward;
        this.time = new Date();
    }

    @Override
    public long getUserId() {
        return userId;
    }
}
